<!--
 * @Author: sdorein sdorein@163.com
 * @Date: 2024-09-14 13:49:19
 * @LastEditors: sdorein sdorein@163.com
 * @LastEditTime: 2024-10-30 16:43:51
 * @FilePath: \Vue3-ts-vite-template\src\views\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- // @ts-expect-error -->
<script lang="ts" setup>
import { ref, onMounted } from 'vue';
import utils from '../utils/util.ts';
// 获取url参数
import { useRoute } from 'vue-router';
const route = useRoute();
const code = route.query.code;

const baseUrl = ref('http://127.0.0.1:3000');

const networkImages = ref(['https://t7.baidu.com/it/u=2604797219,1573897854&fm=193&f=GIF','https://t7.baidu.com/it/u=2942499027,2479446682&fm=193&f=GIF',
'https://t7.baidu.com/it/u=3165657288,4248157545&fm=193&f=GIF','https://t7.baidu.com/it/u=3240224891,3518615655&fm=193&f=GIF','https://t7.baidu.com/it/u=2501476447,3743798074&fm=193&f=GIF'
  ,'https://t7.baidu.com/it/u=2610975262,3538281461&fm=193&f=GIF','https://t7.baidu.com/it/u=3734967019,941734598&fm=193&f=GIF','https://t7.baidu.com/it/u=71977564,2288086088&fm=193&f=GIF'
  ,'https://t7.baidu.com/it/u=2120291633,1902073212&fm=193&f=GIF','https://t7.baidu.com/it/u=1126218742,3382842115&fm=193&f=GIF','https://t7.baidu.com/it/u=2860139544,3309382475&fm=193&f=GIF'
  ,'https://t7.baidu.com/it/u=2067359777,945248471&fm=193&f=GIF','https://t7.baidu.com/it/u=2067359777,945248471&fm=193&f=GIF','https://t7.baidu.com/it/u=2067359777,945248471&fm=193&f=GIF'
  ,'https://t7.baidu.com/it/u=2067359777,945248471&fm=193&f=GIF','https://t7.baidu.com/it/u=2067359777,945248471&fm=193&f=GIF','https://t7.baidu.com/it/u=2067359777,945248471&fm=193&f=GIF'
])
const images = ref(['src/assets/images/7c48cfb7e096003be4d7308e8e7a6af4.jpeg', 
'src/assets/images/32ebda3fff1e96ead1203a76caa6fe67.jpeg', 'src/assets/images/117e5f77abf83e832e134296599a8f99.jpeg', 'src/assets/images/592bd62f6b4f5f52b6f3d1535124ed78.jpeg', 
'src/assets/images/6697e8aa5d361a924ec44dbcbd37deb3.jpeg', 'src/assets/images/c6dc8e9afb8d450a05b4d7f22bb26a57.jpeg', 'src/assets/images/cf8e5f0c266277143310bcf5de80d845.jpeg', 
'src/assets/images/d465d06e6f9f9f0331a4286b14dd3382.webp', 
'src/assets/images/32ebda3fff1e96ead1203a76caa6fe67.jpeg', 'src/assets/images/117e5f77abf83e832e134296599a8f99.jpeg', 'src/assets/images/592bd62f6b4f5f52b6f3d1535124ed78.jpeg', 
'src/assets/images/6697e8aa5d361a924ec44dbcbd37deb3.jpeg', 'src/assets/images/c6dc8e9afb8d450a05b4d7f22bb26a57.jpeg', 'src/assets/images/cf8e5f0c266277143310bcf5de80d845.jpeg', 
'src/assets/images/d465d06e6f9f9f0331a4286b14dd3382.webp', 
'src/assets/images/32ebda3fff1e96ead1203a76caa6fe67.jpeg', 'src/assets/images/117e5f77abf83e832e134296599a8f99.jpeg', 'src/assets/images/592bd62f6b4f5f52b6f3d1535124ed78.jpeg', 
'src/assets/images/6697e8aa5d361a924ec44dbcbd37deb3.jpeg', 'src/assets/images/c6dc8e9afb8d450a05b4d7f22bb26a57.jpeg', 'src/assets/images/cf8e5f0c266277143310bcf5de80d845.jpeg', 
'src/assets/images/d465d06e6f9f9f0331a4286b14dd3382.webp', 
'src/assets/images/32ebda3fff1e96ead1203a76caa6fe67.jpeg', 'src/assets/images/117e5f77abf83e832e134296599a8f99.jpeg', 'src/assets/images/592bd62f6b4f5f52b6f3d1535124ed78.jpeg', 
'src/assets/images/6697e8aa5d361a924ec44dbcbd37deb3.jpeg', 'src/assets/images/c6dc8e9afb8d450a05b4d7f22bb26a57.jpeg', 'src/assets/images/cf8e5f0c266277143310bcf5de80d845.jpeg', 
'src/assets/images/d465d06e6f9f9f0331a4286b14dd3382.webp'])
onMounted(() => {
  getTest();
});

const to = () => {
  let url =
    'weixin://dl/business/?appid=wx819dc2a6086d1ccc&path=pages/tabbar/launch&query=code=009899000&env_version=trial';
  url =
    'weixin://dl/business/?appid=wxa43e7e258dbcd95b&path=pages/index/index&query=code=009899000&env_version=trial';
  window.location.href = url;
};
// --接口使用示例
const getTest = () => {
  let url =
    baseUrl.value +
    `/webapi/eidData.ashx?oper=LTTG_Multifunction&storedPro=P_WXP_Patrol_CheckAuth&paraNum=1&resultSetNum=1&para1=`;
  let param = {
    storedPro: 'P_WXP_Patrol_CheckAuth',
    paraNum: 1,
    resultSetNum: 1,
    para1: '',
  };
  console.log(param);
  utils.getData(url, param).then((res: any) => {
    console.log(res);
    if (res.status == '1') {
    } else {
    }
  });
};

</script>
<template>
  <Footer title="我是全局注册"></Footer>
  <h1>我是首页</h1>
  <h3>页面跳转示例</h3>
  <router-link to="/about">User 123</router-link>
  <a href="weixin://dl/business/?appid=wx819dc2a6086d1ccc&path=pages/tabbar/launch&query=&env_version=trial">微信小程序</a>
  <button @click="to">打开微信小程序</button>
  <img src="./../assets/images/10_9dbeab69-e4e7-4557-a8a7-6d6445718625 (1).png" />
  <div v-for="(item, i) in networkImages" :key="i">
    <!-- <el-image  lazy :src="item" loading="lazy" fit="fill"/> -->
    <img v-lazy="item" alt="Lazy loaded image">
  </div>
</template>
